#
# Makefile for Compiler/runtime
#
# $Id$
#

USE_CORBA = @USE_CORBA@

TOP_DIR=@abs_top_builddir@
FMIINCLUDE = ../../3rdParty/FMIL/install/include
GRAPHINCLUDE=../../3rdParty/metis-5.1.0/include
CJSONINCLUDE = ../../3rdParty/cJSON
ZMQINCLUDE = ../../3rdParty/libzmq/include
GCINCLUDE = -DGC_THREADS -I$(top_builddir)/3rdParty/gc/include
OMC_CONFIG_INC = $(top_builddir)

CFLAGS = @CFLAGS@ @CHECK_C_ERRORS@ $(USE_CORBA)
OMPCC = @CC@ @OMPCFLAGS@
OMBUILDDIR = @OMBUILDDIR@
OMC=@OMC@

ifdef USE_CORBA
  CORBAINCL = @CORBACFLAGS@
  OMCCORBASRC = omc_communication.o omc_communication_impl.o Corba_omc.o
else
  CORBAINCL =
  OMCCORBASRC = corbaimpl_stub_omc.o
endif

SHELL	= /bin/sh
CC	= @CC@
CXX	= @CXX@
IDL	= @IDLCMD@
CXXFLAGS = @CXXFLAGS@
CPPFLAGS = @CPPFLAGS@ -I$(OMC_CONFIG_INC) -I$(top_builddir)/SimulationRuntime/c -I$(top_builddir)/SimulationRuntime/c/simulation/results -I$(top_builddir)/SimulationRuntime/c/util -I$(top_builddir)/SimulationRuntime/c/meta -I$(top_builddir)/SimulationRuntime/c/meta/gc -I. $(CORBAINCL) $(GCINCLUDE) -I$(FMIINCLUDE) -I$(GRAPHINCLUDE) -I$(CJSONINCLUDE) -I$(ZMQINCLUDE)  -I"$(TOP_DIR)/3rdParty/zlib" -I"$(TOP_DIR)/3rdParty/libffi/install/include/"
TRIPLE=@host_short@
SHREXT=@SHREXT@
RPATH=@RPATH@
LDFLAGS = -L "$(builddir_lib)/$(TRIPLE)/omc/" -lOpenModelicaRuntimeC @OMCRUNTIME_SHARED_LDFLAGS@

include Makefile.common

Makefile: Makefile.in
	cd @top_builddir@ && ./config.status
